package com.jianyun.jyzs.presenter;

import android.content.Context;
import android.graphics.Bitmap;

import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter;
import com.jianyun.jyzs.model.SplashModel;
import com.jianyun.jyzs.model.imdoel.ISplashModel;
import com.jianyun.jyzs.view.iview.ISplashView;

/**
 * Created by yangshijun on 2018/9/20.
 */

public class SplashPersenter extends MvpBasePresenter<ISplashView> {

    public void getLancherImg(String url, Context context) {
        if (!isViewAttached()) return;
        SplashModel.getInstance().getSplshPicture(context, url, "", "", new ISplashModel.OngetSplashListener() {
            @Override
            public void onSunccess(String imgPath) {
                getView().setImgPath(imgPath);
            }

            @Override
            public void setBitmap(Bitmap bitmap) {
                getView().setBtimap(bitmap);
            }

            @Override
            public void onFailed() {

            }
        });
    }

}
